﻿
using System;
using Natural.Attributes;
using Natural.Providers;


namespace Natural.Model
{
    [Entity]
    public class PartyType
    {
        public int? Id { get; set; }
        public string Name { get; set; }
    }

    [Entity]
    public class Party
    {
        public int? Id { get; set; }
        public string Name { get; set; }
        public int? TypeId { get; set; }
        public PartyType Type { get; set; }
    }

    [Entity]
    public class DeviceType
    {
        public int? Id { get; set; }
        public string Name { get; set; }
    }
    [Entity( IsRoot = true)]
    public class Device : Activable
    {
        public int? Id { get; set; }
        public string Name { get; set; }
        public int? Status { get; set; }
        public string Code { get; set; }
        public int? TypeId { get; set; }
        public int? PartyId { get; set; }
        public int? LocationId { get; set; }
        public DeviceType Type { get; set; }
        public Party Party { get; set; } 
        public DeviceLocation Location { get; set; }
        
    }
    [Entity]
    public class DeviceLocation
    {
        public int? Id { get; set; }
        public int? DeviceId { get; set; }
        public DateTime? Date { get; set; }
        public decimal? Latitude { get; set; }
        public decimal? Longitude { get; set; }
        //public Device Device { get; set; }
    }
    public enum DeviceStatus
    { Active = 1
    , Incative = 2 
    , Warning = 3
    , Alert = 4
    }

    ////[Config]
    //public class StartConfiguration
    //{
    //    public void Start()
    //    { 
    //        Modeler.AddStatus(
    //    }
    //}
    
}
